#!/bin/bash


PATH_IMAGENES=../../test
CPWD=$PWD
cd $PATH_IMAGENES


for IMAGE_NAME in $(ls *.PNG); do
	IMAGE=$PATH_IMAGENES/$IMAGE_NAME
	echo procesando $IMAGE
	SEED=65468

	cd $CPWD
	if [ -d $IMAGE_NAME ]; then
		rm -rf $IMAGE_NAME;
	fi
	mkdir $IMAGE_NAME

	rm input.txt
	rm output.txt

	echo result_7
	./proc.sh $IMAGE $SEED 1000 0.0000001 result_7
	echo result_6
	./proc.sh $IMAGE $SEED 1000 0.000001 result_6
	echo result_5
	./proc.sh $IMAGE $SEED 1000 0.00001 result_5
	echo result_4
	./proc.sh $IMAGE $SEED 1000 0.0001 result_4
	echo result_3
	./proc.sh $IMAGE $SEED 1000 0.001 result_3
	echo result_2
	./proc.sh $IMAGE $SEED 1000 0.01 result_2
	echo result_1
	./proc.sh $IMAGE $SEED 1000 0.1 result_1
	 
	 mv error* $IMAGE_NAME
	 mv result* $IMAGE_NAME;

done

